@extends('layouts/default_admin')

@section('content')

{{ Notification::show() }}

<div class="row">
  <div class="span6" style="margin-bottom: 10px">
    <h3>Administradores</h3>
    <div class="btn-group">
      <a class="btn btn-small" href="{{ url('admin/create/admin') }}"><i class="icon-plus"></i> Crear Administrador</a>
      <a class="btn btn-small" href="#" id="delete_registers" title="Seleccione uno o mas registros a eliminar." disabled><i class="icon-remove"></i> Eliminar Registros</a>
      <a class="btn btn-small" href="#" id="show_filters"><i class="icon-filter"></i> Mostrar Filtros</a>
    </div>
  </div>
</div>
<table id="filters" class="table table-condensed" style="display:none;">
  <tr>
    <td><input type="text" name="name_filter" id="name_filter" class="span3" placeholder="Nombre del Administrador" title="Ingrese el nombre para filtrar" maxlength="30"/></td>
    <td><input type="text" name="email_filter" id="email_filter" class="span3" placeholder="E-mail" title="Ingrese el e-mail para filtrar" maxlength="8"/></td>
    <td>
      <select class="span3" title="¿Activo?">
        <option value="default">Seleccione...</option>
        <option value="1">Si</option>
        <option value="0">No</option>
      </select>
    </td>
    <td><i class="icon-filter" title="Filtrar"></i></td>
  </tr>
</table>

<table class="table table-hover">
<thead>
  <tr>
    <th style="width: 10px;"><input id="all" style="margin: 0px;" type="checkbox"/></th>
    <th>Login</th>
    <th>Nombre</th>
    <th>Correo</th>
    <th>Activo</th>
    <th style="width: 100px;">Opciones</th>
  </tr>
</thead>
<tbody>

  @foreach ($admins as $admin)
    <tr>
      <td><input id="{{ $admin['adm_code'] }}" style="margin: 0px;" type="checkbox"/></td>
      <td>{{ $admin->adm_login }}</td>
      <td>{{ $admin->adm_name }}</td>
      <td>{{ $admin->adm_email }}</td>
      <td style="padding-left:22px">

        @if ($admin->adm_active == 0) 
          <i class="icon-ban-circle" title="Bloqueado"></i> 
        @else
          <i class="icon-ok-circle" title="Activo"></i>
        @endif
        
      </td>
      <td style="padding-left:22px">
        <a href="{{ url('admin/edit/admin/'.$admin->adm_code) }}"><i class="icon-edit" title="Editar"></i></a>
        <a href="{{ url('admin/changepass/'.$admin->adm_code) }}" style="padding-left: 10px;"><i class="icon-lock" title="Cambiar Contraseña"></i></a>
      </td>
    </tr>
  @endforeach
</tbody>
</table>
<center>{{ $admins->links() }}</center>

{{ Form::open(array('id' => '_delete', 'url' => 'admin/delete', 'style' => 'margin: 0px;')) }}
  <input type="hidden" id="deletereg" name="deletereg" value="" />
  <input type="hidden" id="fec1e92a71" name="fec1e92a71" value="admin_adm" />
{{ Form::close() }}

@stop
